<extend name="Home@Base/common" />
<block name="body">
    <div class="span9 page_message">
        <section id="contents"> <include file="Home@Addons/_nav" />
            <div class="tab-content">
                <ul id="browser" class="filetree treeview-famfamfam">
                    <volist name="user_roles" id="vo1">
                        <empty name="vo1.children">
                            <li><span class="file">{$vo1.name}</span>
                                <else />
                            <li><span class="folder">{$vo1.name}</span>
                        </empty>
                        <notempty name="vo1.children">
                            <ul>
                                <volist name="vo1.children" id="vo2">
                                    <notempty name="vo2.children">
                                        <li><span class="folder">{$vo2.name}</span>
                                    </notempty>
                                    <notempty name="vo2.children">
                                        <ul>
                                            <volist name="vo2.children" id="vo3">
                                                <li><span class="file">{$vo3.name}</span>
                                            </volist>
                                        </ul>
                                    </notempty>
                                    </li>
                                </volist>
                            </ul>
                        </notempty>
                        </li>
                    </volist>
                </ul>
            </div>
        </section>
</block>
<block name="script">
    <script type="text/javascript" charset="utf-8">
        $(function(){
            $("#browser").treeview({
                toggle: function () {
                    console.log("%s was toggled.", $(this).find(">span").text());
                }
            })
        })
    </script>
</block>
